<template>
  <view class="help-sell-list">
    <view v-for="(it, ix) in list" :key="ix" class="item" @click.stop="_handleClick(it)">
      <view class="user-wrap">
        <image :src="it.headAvatar" mode="aspectFill" class="avatar" />
        <view class="user-info">
          <view class="name">{{it.headNickname}}</view>
          <view class="txt">成员{{it.memberCount||0}}  最近活跃{{it.activityDay}}天内</view>
        </view>
      </view>
      <view class="data-wrap">
        <view class="data-item">
          <view class="num">{{it.helpSellOrderAmount}}元</view>
          <view class="txt">帮我卖了</view>
        </view>
        <view class="data-item">
          <view class="num">{{it.helpSellOrderCount}}单</view>
          <view class="txt">帮我卖了</view>
        </view>
        <view class="data-item">
          <view class="num">{{it.recommendCount}}人</view>
          <view class="txt">帮我推荐</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'helpSellList',
  props: {
    list: {
      type: Array,
      required: true
    }
  },
  methods: {
    _handleClick(item) {
      this.navigateTo({ url: `/pagesA/helpSellGroups/expertDetails?headAccountId=${item.headAccountId}`})
    },
  }
}
</script>

<style lang="scss" scoped>
.help-sell-list {
  width: 100%;
  background-color: #FFFFFF;
  .item {
    padding: 32rpx;
    border-bottom: 2rpx solid #EBEDF0;
  }
  .user-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 72rpx;
    .user-info {
      flex: 1;
    }
    .avatar {
      width: 64rpx;
      height: 64rpx;
      margin-right: 16rpx;
      border-radius: 50%;
    }
    .name {
      font-size: 28rpx;
      line-height: 40rpx;
      font-weight: 500;
      color: $n8Color;
      @include bov(1)
    }
  }
  .data-wrap {
    display: flex;
    height: 106rpx;
    margin: 14rpx 0 0 80rpx;
    padding: 16rpx 0;
    .data-item {
      height: 100%;
      min-width: 140rpx;
      margin-right: 16rpx;
    }
    .num {
      font-weight: 500;
      font-size: 28rpx;
      line-height: 40rpx;
      color: $n8Color;
    }
  }
  .txt {
    font-size: 24rpx;
    line-height: 32rpx;
    color: $n6Color;
  }
}
</style>